

//str 要传入的字符串  key 代表要高亮的字符串
export const heightLight = (str, key) => {
    const reg = new RegExp(key, 'ig')
    return str.replace(reg, (val) => {
        return `<span style="color:rgb(214 186 31)">${val}</span>`
    })
}